<?php
class PermissionsForm extends Zend_Form {
    public function __construct($options = null) 
    {
    	$baseurl 	= new MHDEV_View_Helper_BaseUrl();
    	$translate	= Zend_Registry::get('lang');
    	
        parent::__construct($options);
        
        $this->setName('permissions');
        
        // board_ui
        $board_uid = new Zend_Form_Element_Select('board_uid');
       	$board_uid->registerInArrayValidator(false);
        $board_uid->setLabel($translate->_('form_permission_board'));
        $board_uid->addMultiOption('#', $translate->_('form_choose'));
        $board_uid->addMultiOption('all', $translate->_('admin_permission_allb'));
        
        // has_access
		$access = new Zend_Form_Element_Checkbox('has_access');
		$access->setLabel($translate->_('form_permission_access'));
		$access->setDescription($translate->_('form_permission_daccess'));
		
		// is_mod
		$mod = new Zend_Form_Element_Checkbox('is_moderator');
		$mod->setLabel($translate->_('form_permission_mod'));
		$mod->setDescription($translate->_('form_permission_dmod'));
        
        // submit
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel($translate->_('form_save'));

        
        $this->addElements(array($board_uid, $access, $mod, $submit));
    }
}  
?>